<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>视盾科技-图片上传</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
		.updatepwd_div{
			margin-top:200px;
		}
		.updatepwd_btn{
			width:120px;
			margin-left:70px;
		}
	</style>
  </head>
  
  <body>
	<div class="right">
		
		<button id="browse" name="uploadImage">选择文件</button>
		<button id="start_upload">开始上传</button>
	
	
	</div>
	
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/resources/plupload/plupload.full.min.js"></script>
	
	
	<script type="text/javascript">
	// Custom example logic 
	var path='<%=basePath%>';
	var uploader = new plupload.Uploader({
        browse_button : 'browse', //触发文件选择对话框的按钮，为那个元素id
        url : path+'/imagesAction_saveFile.action', //服务器端的上传页面地址
        filters : {
    		max_file_size : '10mb',
    		mime_types: [
    			{title : "Image files", extensions : "jpg,gif,png"}
    		]
    	},
    }); 
	
	uploader.init();
	document.getElementById('start_upload').onclick = function(){
        uploader.start(); //调用实例对象的start()方法开始上传文件，当然你也可以在其他地方调用该方法
    };
	
	
	</script>
		
  </body>
</html>
